Column description while PreCloseModule trigger

Hello altogether,

can anybody help me, how I can figure out, which column of the current view is the main column during a PreCloseModule trigger?

Problem description: I've installed a pre-close-module trigger, in which I'm checking the history of each object and - if I find a "modifyObject" history type -  want to inform some users, that the attribute "XY" has been modified.

Well, the most columns in the used views have a title, which is not the AttrDef name. Therefore I wanted to check each column, which attribute is displayed in the current column and if this is the changend attribute I wanted to additionally send the titel of the column to get the more meaningful description (together with the view name and the AttrDef name)

This works almost perfect... As long as I do this during a "normal" opened module (read only, shared or exclulsive is unimportant).

But as soon as I put this code in my PreCloseModule script, I'm getting an EXCEPTION_ACCESS_VIOLATION during the call of "main(column)"

Attached is the simplified code which does its job in the "Tools->Edit DXL" dialog, but not during the PreCloseModule process.

Some additional information: The main column in the view is currently not the first column and the code below delivers the correct titles of the first columns. But then, when the main column has to be checked,.... Bang.

 

void PreCloseModuleCalled()
{
  Column col
  for col in current Module do 
  {
    string att = attrName(col)
    if (null att)
    {
      if (main(col))
      {
        print "main\t"
      }
      else
      {
        print "dxl(col)\t"
      }
    }
    else
    {
      print att "\t"
    }
  }
}

When the code crashes, the DXL Interaction window will be opened (together with the "Diagnostic Log" window), containing the following information (once again simplified. The original line number is 1279, but this is the "if (main(col))" line, here in this example line 9)

-R-E- DXL: <"script file.dxl":9> An unexpected error has occurred: doors.exe caused an EXCEPTION_ACCESS_VIOLATION in module doors.exe at 0023:00565DDE
<some Backtrace lines>
-R-F- DXL: <"script file.dxl":9> internal error, please submit a bug report
<some Backtrace lines>
-I- DXL: execution halted

It seems, that the main(...) function is not allowed during a PreCloseModule process... Can you confirm this or is there another bug in my head :-)?

I'm using DOORS client veriosn 9.3.0.7

Best regards,

Michael


MichaelBrockhaus - Wed Nov 19 04:18:49 EST 2014